package com.edu.bean;

import java.util.List;

public class PressVO {
    private int pressId;
    private String pressName;
    private String pressCity;
    private List<Book> bookList;
    private List<Writer> writerList;

    public int getPressId() {
        return pressId;
    }

    public void setPressId(int pressId) {
        this.pressId = pressId;
    }

    public String getPressName() {
        return pressName;
    }

    public void setPressName(String pressName) {
        this.pressName = pressName;
    }

    public String getPressCity() {
        return pressCity;
    }

    public void setPressCity(String pressCity) {
        this.pressCity = pressCity;
    }

    public List<Book> getBookList() {
        return bookList;
    }

    public void setBookList(List<Book> bookList) {
        this.bookList = bookList;
    }

    public List<Writer> getWriterList() {
        return writerList;
    }

    public void setWriterList(List<Writer> writerList) {
        this.writerList = writerList;
    }

    @Override
    public String toString() {
        return "PressVO{" +
                "pressId=" + pressId +
                ", pressName='" + pressName + '\'' +
                ", pressCity='" + pressCity + '\'' +
                ", bookList=" + bookList +
                ", writerList=" + writerList +
                '}';
    }

    public String toString(String listName) {
        if ("bookList".equals(listName)) {
            return "PressVO{" +
                    "pressId=" + pressId +
                    ", pressName='" + pressName + '\'' +
                    ", pressCity='" + pressCity + '\'' +
                    ", bookList=" + bookList +
                    '}';
        } else if ("writerList".equals(listName)) {
            return "PressVO{" +
                    "pressId=" + pressId +
                    ", pressName='" + pressName + '\'' +
                    ", pressCity='" + pressCity + '\'' +
                    ", writerList=" + writerList +
                    '}';
        } else {
            return "PressVO{" +
                    "pressId=" + pressId +
                    ", pressName='" + pressName + '\'' +
                    ", pressCity='" + pressCity + '\'' +
                    ", bookList=" + bookList +
                    ", writerList=" + writerList +
                    '}';
        }
    }
}
